<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"> 

<ui:composition template="/_funcionario.xhtml">
	<ui:define name="corpo">

		<div id="conteudo">
			<h:form>

				<h2>
					<h:outputText value="Novo Cargo"
						rendered="#{empty cargoBean.cargo.id}" />
					<h:outputText value="Editar Cargo"
						rendered="#{not empty cargoBean.cargo.id}" />
				</h2>

				<p:fieldset legend="Dados do Cargo" toggleable="true"><br />
						
					<h:outputLabel value="Nome: " for="nome" />
					<p:inputText id="nome" value="#{cargoBean.cargo.nome}" style="width: 300px;">
						<f:ajax event="change" />
					</p:inputText><br />

					<br />
					<p:commandButton value="Gravar" action="#{cargoBean.grava}" ajax="false">
						<f:ajax render="form" />
					</p:commandButton>

				</p:fieldset>
				
				<p:messages id="msg"/>


			</h:form>
		</div>

	</ui:define>
</ui:composition>

</html>
